package com.scud.product.service.impl;

import com.scud.product.mapper.CategoryMapper;
import com.scud.product.service.CategoryService;
import com.scud.model.product.pojo.Category;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author vermouth
 */
@Service
public class CategoryServiceImpl implements CategoryService {

    @Autowired
    private CategoryMapper categoryMapper;

    /**
     * 获取分类列表
     * @return Result
     */
    @Override
    public List<Category> list() {
        //调用数据库查询所有分类数据
        List<Category> categoryList=categoryMapper.selectAll();
        return categoryList;
    }
}
